//
// Created by Administrator on 2016/12/9.
//

#ifndef PROJECT_CUBE_H
#define PROJECT_CUBE_H

#include "stdafx.h"

class Cube {
public:
    uint16_t mIndex;

    Cube(btDynamicsWorld *dynamicsWorld, float size, btCollisionShape *pShape, glm::mat4 &modelTrans, AXESPOS &axesPos);

    static std::vector<glm::mat4> instanceTransforms;
    static btDynamicsWorld *dynamicsWorld;

    AXESPOS mAxesPosOrigin;
    glm::vec3 mPosOrigin;

    float mSize;

    AXESPOS mAxesPos;
    btRigidBody *mRigidBody;

    void updateAxesPos(glm::mat4 *rubikTrans);

    void resetTransform(glm::mat4 transform, glm::mat4 *rubikTrans = nullptr);

    virtual ~Cube();
};


#endif //PROJECT_CUBE_H
